MicroPython Cookbook by Marwan Alsabbagh

MicroPython Cookbook by Marwan Alsabbagh
Author: Marwan Alsabbagh
Language: eng
Format: mobi
Tags: COM049000 - COMPUTERS / Hardware / Peripherals, COM051360 - COMPUTERS / Programming Languages / Python, COM038000 - COMPUTERS / Hardware / Mainframes and Minicomputers
Publisher: Packt Publishing
Published: 2019-05-20

There's more...


In this recipe, we have combined three input controls and two output servos in a way that makes interacting with the board a natural process. Part of the reason for this is that different physical input controls lend themselves to be mapped to different logical controls.

A slide switch is ideal for switching between two options, so it makes sense to use a slide switch when selecting between two servos. Push buttons work well when you want to repeatedly increase or reduce a value through repeated button presses.